package org.ns.framework.webmvc.anns;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 从header 获取locale
 * 
 * @author zhangxingyu
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.ANNOTATION_TYPE, ElementType.PARAMETER })
@Inherited
@Documented
public @interface GetLocale {

	String[] value() default { "userLocale", "locale", "Accept-Language" };

	/**
	 * 是否允许从参数查找locale
	 * 
	 * @return 默认允许
	 */
	boolean p() default true;
}
